```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MySQL连接操作指南</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", sans-serif;
            color: #333;
            line-height: 1.6;
        }
        h1, h2, h3 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
        }
        .hero {
            background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
        }
        .card {
            transition: all 0.3s ease;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        }
        .sql-code {
            background-color: #2d2d2d;
            color: #f8f8f2;
            border-radius: 0.375rem;
            font-family: 'Courier New', Courier, monospace;
        }
        .connector-icon {
            color: #4f46e5;
            font-size: 1.5rem;
        }
        .footer {
            background-color: #1a1a1a;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <div class="hero text-white py-20 px-4 sm:px-6 lg:px-8">
        <div class="max-w-5xl mx-auto text-center">
            <h1 class="text-4xl md:text-5xl font-bold mb-6">MySQL连接操作完全指南</h1>
            <p class="text-xl md:text-2xl mb-8 max-w-3xl mx-auto">掌握左连接、右连接及各种关联查询的艺术，提升你的数据库查询技能</p>
            <div class="flex justify-center space-x-4">
                <a href="#left-join" class="px-6 py-3 bg-white text-indigo-600 font-medium rounded-lg hover:bg-gray-100 transition duration-300">
                    <i class="fas fa-code-branch mr-2"></i>开始学习
                </a>
            </div>
        </div>
    </div>

    <!-- Main Content -->
    <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
        <!-- Introduction -->
        <div class="mb-16">
            <div class="prose prose-lg max-w-none">
                <h2 class="text-3xl font-bold text-gray-800 mb-6">MySQL连接操作概述</h2>
                <p>当谈到MySQL中的左连接和右连接时，我们涉及的是关系型数据库中非常重要的操作：连接（Join）。连接允许我们将两个或多个表中的行相互关联，以便同时访问这些表中的数据。</p>
                <p>左连接和右连接是连接操作中的两种常见类型，它们分别提供了不同的结果集，以满足不同的查询需求。在实际应用中，左连接和右连接经常用于解决数据关联和查询的需求。</p>
                <div class="mt-8 bg-blue-50 p-6 rounded-lg border-l-4 border-blue-500">
                    <div class="flex">
                        <div class="flex-shrink-0">
                            <i class="fas fa-lightbulb text-blue-500 text-2xl"></i>
                        </div>
                        <div class="ml-3">
                            <p class="text-blue-800">在电子商务系统中，我们可能需要查询订单信息及其对应的产品信息，这时可以使用左连接；在社交网络系统中，我们可能需要查询用户信息及其关联的好友信息，这时可以使用右连接。</p>
                        </div>
                    </div>
                </div>
                <p class="mt-6">左连接和右连接是MySQL中连接操作的重要组成部分，它们提供了灵活和强大的数据关联功能，可以帮助我们实现各种复杂的数据查询和分析任务。</p>
            </div>
        </div>

        <!-- Key Concepts -->
        <div class="grid md:grid-cols-2 gap-8 mb-16">
            <!-- Left Join Card -->
            <div class="card bg-white p-6 rounded-lg">
                <div class="flex items-center mb-4">
                    <div class="connector-icon mr-3">
                        <i class="fas fa-arrow-left"></i>
                    </div>
                    <h3 class="text-2xl font-bold text-gray-800">左连接 (LEFT JOIN)</h3>
                </div>
                <p class="text-gray-700 mb-4">左连接允许我们检索左表中的所有行，同时与右表中的匹配行进行关联。即使右表中没有与左表匹配的行，左连接也会返回左表中的所有行，并在右表中没有匹配行的位置填充NULL值。</p>
                <div class="sql-code p-4 mb-4">
                    <pre><code>SELECT * FROM left_table 
LEFT JOIN right_table 
ON left_table.column = right_table.column;</code></pre>
                </div>
                <div class="bg-indigo-50 p-4 rounded-lg">
                    <p class="text-indigo-800"><strong>示例场景：</strong> 查询所有部门以及属于各个部门的员工信息，即使某些部门没有员工也要返回。</p>
                    <div class="sql-code p-3 mt-2 text-sm">
                        <pre><code>SELECT d.name AS department_name, e.name AS employee_name
FROM departments d
LEFT JOIN employees e ON d.id = e.department_id;</code></pre>
                    </div>
                </div>
                <div class="mt-4">
                    <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1713146525589-b3dc90c4-f65c-4945-ae05-7d0af753280c.png" alt="左连接图示" class="w-full rounded-lg shadow">
                </div>
            </div>

            <!-- Right Join Card -->
            <div class="card bg-white p-6 rounded-lg">
                <div class="flex items-center mb-4">
                    <div class="connector-icon mr-3">
                        <i class="fas fa-arrow-right"></i>
                    </div>
                    <h3 class="text-2xl font-bold text-gray-800">右连接 (RIGHT JOIN)</h3>
                </div>
                <p class="text-gray-700 mb-4">右连接允许我们检索右表中的所有行，同时与左表中的匹配行进行关联。即使左表中没有与右表匹配的行，右连接也会返回右表中的所有行，并在左表中没有匹配行的位置填充NULL值。</p>
                <div class="sql-code p-4 mb-4">
                    <pre><code>SELECT * FROM left_table 
RIGHT JOIN right_table 
ON left_table.column = right_table.column;</code></pre>
                </div>
                <div class="bg-indigo-50 p-4 rounded-lg">
                    <p class="text-indigo-800"><strong>示例场景：</strong> 查询所有订单以及下单客户的信息，即使某些订单没有对应的客户信息也要返回。</p>
                    <div class="sql-code p-3 mt-2 text-sm">
                        <pre><code>SELECT o.order_number, c.name AS customer_name
FROM orders o
RIGHT JOIN customers c ON o.customer_id = c.id;</code></pre>
                    </div>
                </div>
                <div class="mt-4">
                    <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1713146562099-6fa63d97-b37b-4e55-bb93-a375d1ab1537.png" alt="右连接图示" class="w-full rounded-lg shadow">
                </div>
            </div>
        </div>

        <!-- Other Join Types -->
        <div class="grid md:grid-cols-2 gap-8 mb-16">
            <!-- Inner Join Card -->
            <div class="card bg-white p-6 rounded-lg">
                <div class="flex items-center mb-4">
                    <div class="connector-icon mr-3">
                        <i class="fas fa-arrows-alt-h"></i>
                    </div>
                    <h3 class="text-2xl font-bold text-gray-800">内连接 (INNER JOIN)</h3>
                </div>
                <p class="text-gray-700 mb-4">内连接是一种常用的关联查询操作，它允许我们检索两个表中满足连接条件的行，并将它们合并成一个结果集。内连接只返回两个表中匹配的行，不包括不匹配的行。</p>
                <div class="sql-code p-4 mb-4">
                    <pre><code>SELECT * FROM table1 
INNER JOIN table2 
ON table1.column = table2.column;</code></pre>
                </div>
                <div class="bg-indigo-50 p-4 rounded-lg">
                    <p class="text-indigo-800"><strong>示例场景：</strong> 查询所有学生以及他们所选课程的信息，只返回已选课的学生信息。</p>
                    <div class="sql-code p-3 mt-2 text-sm">
                        <pre><code>SELECT s.name AS student_name, c.name AS course_name
FROM students s
INNER JOIN courses c ON s.id = c.student_id;</code></pre>
                    </div>
                </div>
                <div class="mt-4">
                    <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1713146591176-22b5e0bf-fe37-45f1-b7b5-8f474bc020da.png" alt="内连接图示" class="w-full rounded-lg shadow">
                </div>
            </div>

            <!-- Full Join Card -->
            <div class="card bg-white p-6 rounded-lg">
                <div class="flex items-center mb-4">
                    <div class="connector-icon mr-3">
                        <i class="fas fa-arrows-alt"></i>
                    </div>
                    <h3 class="text-2xl font-bold text-gray-800">全连接 (FULL JOIN)</h3>
                </div>
                <p class="text-gray-700 mb-4">全连接将两个表中的所有行都进行连接，并且对于其中一个表中没有匹配行的情况，会填充 NULL 值。MySQL 中并没有直接支持全连接的语法，但可以通过左连接和右连接的组合来实现。</p>
                <div class="sql-code p-4 mb-4">
                    <pre><code>SELECT *
FROM table1
LEFT JOIN table2 ON table1.column = table2.column
UNION
SELECT *
FROM table1
RIGHT JOIN table2 ON table1.column = table2.column
WHERE table1.column IS NULL;</code></pre>
                </div>
                <div class="bg-indigo-50 p-4 rounded-lg">
                    <p class="text-indigo-800"><strong>示例场景：</strong> 查询所有学生以及他们所选课程的信息，同时包括那些没有选课的学生和那些没有学生选课的课程信息。</p>
                    <div class="sql-code p-3 mt-2 text-sm">
                        <pre><code>SELECT s.name AS student_name, c.name AS course_name
FROM students s
LEFT JOIN courses c ON s.id = c.student_id
UNION
SELECT s.name AS student_name, c.name AS course_name
FROM students s
RIGHT JOIN courses c ON s.id = c.student_id;</code></pre>
                    </div>
                </div>
                <div class="mt-4">
                    <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1713147262381-05648399-0e05-4f37-9324-c6bc61538998.png" alt